use hotel_reservation::grpc::reservation::reservation_service_client::ReservationServiceClient;
use hotel_reservation::grpc::reservation::CreateReservationRequest;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut client = ReservationServiceClient::connect("http://[::1]:50051").await?;
    
    let request = tonic::Request::new(CreateReservationRequest {
        guest_name: "张三".to_string(),
        guest_email: "zhangsan@example.com".to_string(),
        guest_phone: "13800138000".to_string(),
        room_number: "101".to_string(),
        check_in_date: "2024-01-15".to_string(),
        check_out_date: "2024-01-17".to_string(),
        total_amount: 600.0,
    });

    let response = client.create_reservation(request).await?;
    
    println!("预订创建成功: {:?}", response.into_inner());
    
    Ok(())
}